package base.LRU;

import java.util.HashMap;
import java.util.Map;

/**
 * @author yanyun zhu
 * @version 1.0
 * @date 2021/12/22 14:59
 */
public class LRUCache<K,V> {

    private int currentCacheSize;
    private int CacheCapcity;
    private Map<K,CacheNode> caches;
    private CacheNode first;
    private CacheNode last;

    public LRUCache(int size){
        currentCacheSize = 0;
        this.CacheCapcity = size;
        caches = new HashMap<K,CacheNode>(size);
    }

    /**
     * 1， 不存在
     *      没满  加在开头
     *      满了   删除最后 + 加在开头
     *
     * 2，
     *  存在， 移动到开头
     * @param k
     * @param v
     */
    public void put(K k, V v){

//        if(caches)
    }



    class CacheNode{
        CacheNode pre;
        CacheNode next;
        Object key;
        Object value;
        public CacheNode(){}
    }
}
